using HCore.IOC.Beans.Factory.Attribute.Attr;
using HCore.IOC.Context.Event.Attr;
using HCore.IOC.Context.Stereotype;
using HCore.Tests.Runtime.DianDianDian.Model;
using HCore.Tests.Runtime.ShootingEditor2D.Scripts.Support.CommandQuery;

namespace HCore.Tests.Runtime.DianDianDian.Command
{
    public class BuyLifeCommand : ICommand
    {
    }

    [Component]
    public class BuyLifeCommandReceiver
    {
        [Autowired] private IGameModel mGameModel;

        [EventListener]
        public void OnBuyLifeCommand(BuyLifeCommand command)
        {
            mGameModel.Gold--;
            mGameModel.Life++;
        }
    }
}